package com.ease.common.vo;

import java.util.Map;

/**
 * 
 * @author nathanleewei
 * 
 */
public class SystemConfigurationBean {

	private Map<String, Object> configuration;

	public int getInt(String entryKey) {
		String value = getString(entryKey);
		if (null != value) {
			return Integer.parseInt(value);
		}
		return -1;
	}

	public String getString(String entryKey) {
		Object value = getValue(entryKey);
		if (null != value) {
			return String.valueOf(value);
		}
		return null;
	}

	public Object getValue(String entryKey) {
		if (null != configuration) {
			return configuration.get(entryKey);

		}
		return null;
	}

	/**
	 * @return Returns the configuration.
	 */
	public Map<String, Object> getConfiguration() {
		return configuration;
	}

	/**
	 * @param configuration
	 *            The configuration to set.
	 */
	public void setConfiguration(Map<String, Object> configuration) {
		this.configuration = configuration;
	}

}
